package com.jdk8.parameter_04;

import java.util.ArrayList;
import java.util.List;

public class StrategyModel {

    public <T> List<T> filter(String color, Strategy<T> strategy, List<T> list) {
        List<T> lists = new ArrayList<>();
        for (T t : list) {
            if (strategy.Strategy(color, t)) {
                lists.add(t);
            }
        }
        return lists;
    }

    
}
